package com.ibeeking.found.cop.service.common.dos;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;

/**
 * @ClassName  GroupTagsRelDO
 * @Description 群标签关系表
 * @Author ibeeking
 * @Date 2021-01-15 10:44
 **/
@Data
@TableName("friends_tags_rel")
public class FriendsTagsRelDO implements Serializable {
    private static final long serialVersionUID = -1L;

    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 群id
     */
    @TableField(value = "friends_id")
    private Long friendsId;

    /**
     * 标签id
     */
    @TableField(value = "tags_id")
    private Long tagsId;

    public Long getId() {
        return id == null ? tagsId : id;
    }

    public FriendsTagsRelDO(Long id, Long friendsId, Long tagsId) {
        this.id = id;
        this.friendsId = friendsId;
        this.tagsId = tagsId;
    }

}
